//加载行政区

// 多边形要素类
let coord = polygonCoords;

let clipgeom = new ol.geom.Polygon([coord]);
var feature = new ol.Feature({
    geometry: clipgeom,
});


var map = new ol.Map({
    layers: [
        new ol.layer.Tile({
            title: "base",
            source: new ol.source.OSM()
        }),
        new ol.layer.Vector({
            source: new ol.source.Vector({
                features: [feature]
            }),
            style: new ol.style.Style({
                stroke: new ol.style.Stroke({
                    width: 3,
                    color: [255, 0, 0, 1]
                }),
                fill: new ol.style.Fill({
                    color: [0, 0, 255, 0.6]
                })
            })
        })
    ],
    target: 'map',
    view: new ol.View({
        center: [116.40, 39.50],
        projection: 'EPSG:4326',
        zoom: 10
    })
});